package com.oig.sys.base.dto;

import com.oig.common.validator.GroupAdd;
import com.oig.common.validator.GroupEdit;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Schema
@Data
public class AreaDto {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotNull(message = "id必填", groups={GroupEdit.class})
    private Integer id;

    @Schema(description = "所属国家编码")
    //@NotEmpty(message = "参数错误,所属国家编码不能为空", groups={GroupAdd.class, GroupEdit.class})
    private String countryCode;

    @Schema(description = "编码", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotEmpty(message = "参数错误,编码不能为空", groups={GroupAdd.class, GroupEdit.class})
    private String code;

    @Schema(description = "名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotEmpty(message = "参数错误,名称不能为空", groups={GroupAdd.class,GroupEdit.class})
    private String name;

    @Schema(description = "英文名称")
    private String enName;

    @Schema(description = "上级id")
    private Integer parentId;

    @Schema(description = "状态")
    private String status;
}
